#include <ximera/audio/openal/listener.hpp>
#include <ximera/audio/openal/openal.hpp>

namespace ximera { namespace audio { namespace openal
{
    Listener::~Listener()
    {
    }

    math::Vector3 const& Listener::position() const
    {
        return _position;
    }

    void Listener::position(math::Vector3 const& pos)
    {
        _position = pos;

        alListenerfv(AL_POSITION, _position.array());
    }

    math::Vector3 const& Listener::velocity() const
    {
        return _velocity;
    }

    void Listener::velocity(math::Vector3 const& vel)
    {
        _velocity = vel;

        alListenerfv(AL_VELOCITY, _velocity.array());
    }
}}}
